﻿<Window x:Class="TestApp.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="600" Width="1400">
    <DockPanel>
        <Grid DockPanel.Dock="Top"  Margin="4">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            
            <Label>Select the file to view:</Label>
            <ComboBox Grid.Column="1"
                      ItemsSource="{Binding SampleDocuments}"
                      DisplayMemberPath="Key"
                      SelectedValuePath="Key"
                      SelectedValue="{Binding SelectedDocumentName}" />
        </Grid>
        <Grid DockPanel.Dock="Bottom" Margin="4">
            <Button IsDefault="True" IsCancel="True" HorizontalAlignment="Right">Close</Button>
        </Grid>

        <UniformGrid Columns="3">

            <FlowDocumentReader Margin="4"
                                Document="{Binding SelectedDocument}">

            </FlowDocumentReader>

            <DocumentViewer Name="Original"
                            Margin="4"
                            Document="{Binding SystemPaginatedDocument}"
                            VerticalOffset="{Binding VerticalOffset, ElementName=Smart, Mode=TwoWay}"
                            HorizontalOffset="{Binding HorizontalOffset, ElementName=Smart, Mode=TwoWay}">

            </DocumentViewer>

            <DocumentViewer Name="Smart"
                            Margin="4"
                            Document="{Binding CustomPaginatedDocument}">

            </DocumentViewer>
        </UniformGrid>
    </DockPanel>
</Window>
